<template>
  <div class="shouxinxinxi" style>
    <dv-scroll-board :config="config" style="height: 220px" />
  </div>
</template>
<script>
import axios from "axios";

export default {
  name: "shouxinxinxi",
  components: {},
  data() {
    return {
      config: {
        headerBGC: "#5555",
        oddRowBGC: "#003B5155",
        evenRowBGC: "#0A273255",
        columnWidth: [100, 150, 100, 100],
        header: ["企业名称", "申请时间", "本次授信额度", "授信总额"],
        data: [
          ["测试企业", "2021-8.7 12:50", "30天", "100万元"],
          ["测试企业", "2021-8.7 12:50", "30天", "100万元"],
          ["测试企业", "2021-8.7 12:50", "30天", "100万元"],
          ["测试企业", "2021-8.7 12:50", "30天", "100万元"],
          ["测试企业", "2021-8.7 12:50", "30天", "100万元"],
          ["测试企业", "2021-8.7 12:50", "30天", "100万元"],
          ["测试企业", "2021-8.7 12:50", "30天", "100万元"],
        ],
      },
    };
  },
  computed: {},
  watch: {},
  mounted() {
    this.loadData();
  },
  methods: {
    loadData() {
      let _this = this;
      console.log(111111111111);
      axios({
        url: "http://39.103.184.219:19007/api/emp/packageListPage",
        method: "post",
        headers: { "Content-Type": "application/json" },
        data: {
          current: 1,
          empId: "140500925346824192",
          limit: 10,
        },
      }).then((res) => {
        let aaa = {
          headerBGC: "#5555",
          oddRowBGC: "#003B5155",
          evenRowBGC: "#0A273255",
          columnWidth: [90, 150, 120, 100],
          header: ["企业名称", "申请时间", "本次授信额度", "授信总额"],
          data: [],
        };
        res.data.rows.map((item) => {
          aaa.data.push([
            item.empName,
            item.applicationTime,
            item.creditBalance,
            item.creditLine,
          ]);
        });
        _this.config = aaa;
      });
    },
  },
};
</script>
<style lang='scss' scoped>
.shouxinxinxi {
  padding: 10px;
}
</style>